﻿using System;
using Ewk.Math.ComputationTypes;

namespace Ewk.Math.Algebra.UnitTests.MatrixTests.NumericTests
{
    public abstract class NumericTestBase<T> : MatrixUnitTestsBase<T>
        where T : struct, IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
    {
        private const int M = 3;

        private int _rowCount = M;
        private int _columnCount = M;

        protected int RowCount
        {
            get { return _rowCount; }
            set { _rowCount = value; }
        }

        protected int ColumnCount
        {
            get { return _columnCount; }
            set { _columnCount = value; }
        }

        protected abstract Matrix<T> Matrix { get; }

        protected Matrix<T> Identity
        {
            get { return Matrix<T>.Identity(RowCount); }
        }

        protected Computable<T> Zero
        {
            get { return Computable<T>.Factory.Zero; }
        }

        protected Computable<T> One
        {
            get { return Computable<T>.Factory.One; }
        }

        protected Computable<T> Two
        {
            get { return One + One; }
        }

        protected Computable<T> Three
        {
            get { return Two + One; }
        }
    }
}